// NonDBPropertyParser.cpp: implementation of the NonDBPropertyParser class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "NonDBPropertyParser.h"

#include "NonDBVariable.h"
#include "Property.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
namespace pa
{
	UE_IMPLEMENT_DYNPROPERTYCREATE(NonDBPropertyParser)

	NonDBPropertyParser::NonDBPropertyParser()
	{

	}

	NonDBPropertyParser::~NonDBPropertyParser()
	{

	}

	bool NonDBPropertyParser::IsLegeal(const OriginalProperty& OP)
	{
		CString strStyle = OP->GetString(_T("PropertyStyle"));
		bool isCustomization = !OP->GetBool("Customization");
		if((strStyle == "out") && (isCustomization))
		{
			return true;
		}
		else 
		{
			return false;
		}
	}

	Property* NonDBPropertyParser::NewProperty(const OriginalProperty& OP)
	{
		NonDBVariable* pVariable = new NonDBVariable;
		PropertyParser::CopyPublicData(pVariable,OP);

		pVariable->SetPropertyType(Property::eNONDB);

		return pVariable;
	}
};